<template>
  <div class="page">
      <div class="page_db">
        <div class="weui-panel weui-panel_access">
          <div class="weui-pandel__bd">
            <block v-for="item in voteList" :key="index">
            <a href="#" class="weui-media-box weui-media-box-appmsg">
              <div class="weui-media-box__hd weui-media-box__hd_in-appmsg">
                <img :src="item.oneVoteData.files[0]" alt="image" class="weui-media-box__thumb">
              </div>
              <div class="weui-media-box_bd weui-media-box__bd_in-appmsg">
                <div class="weui-media-box__title">{{item.oneVoteData.title}}</div>
                <div class="weui-media-box__desc`">{{item.oneVoteData.description}}</div>
              </div>
            </a>
            </block>
           

          </div>
        </div>
      </div>

  </div>
</template>

<script>
export default {
    created(){
       
    },
    onShow(){
      this.onQuery()
    },
    data(){
        return{
          icon60:"",
          voteList:[]
        }
    },
    methods:{
    //获取云数据库数据
        onQuery(){
          let that = this
          const db = wx.cloud.database()
          db.collection("vote").get({
            success:res=>{
              console.log(res)
              that.voteList = res.data
            }
          })
        }
    }
}
</script>

<style>

</style>